# Copyright 2024 Henrique Paone
#
# This file is part of Kitty-Visual.
#
# Kitty-Visual is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
# 
# Kitty-Visual is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License along with
# Kitty-Visual. If not, see <https://www.gnu.org/licenses/>.

# Note that the parsing code uses either ~ or u as the delimeter, therefore it
# doesn't differentiate between overlapping code, this is a issue only for Enter
# and F3 which are, respectevely, 13u and 13~. For now we ignore F3.
Functional_keys = {
  '27' => 'Esc',
  '127' => 'BS',
  'A' => 'Up',
  'D' => 'Left',
  'B' => 'Down',
  'C' => 'Right',
  'H' => 'Home',
  '7' => 'Home',
  'Q' => 'F2',
  '12' => 'F2',
  '15' => 'F5',
  '19' => 'F8',
  '23' => 'F11',
  '57377' => 'F14',
  '57380' => 'F17',
  '57383' => 'F20',
  '57386' => 'F23',
  '57389' => 'F26',
  '57392' => 'F29',
  '57395' => 'F32',
  '57398' => 'F35',
  '13' => 'CR',
  '2' => 'Insert',
  '5' => 'PageUp',
  'F' => 'End',
  '8' => 'End',
  '13~' => 'F3', 
  '17' => 'F6',
  '20' => 'F9',
  '24' => 'F12',
  '57378' => 'F15',
  '57381' => 'F18',
  '57384' => 'F21',
  '57387' => 'F24',
  '57390' => 'F27',
  '57393' => 'F30',
  '57396' => 'F33',
  '57376' => 'F13',
  '57379' => 'F16',
  '57382' => 'F19',
  '57385' => 'F22',
  '57388' => 'F25',
  '57391' => 'F28',
  '57394' => 'F31',
  '57397' => 'F34',
  '9' => 'Tab',
  '3' => 'Del',
  '6' => 'PageDown',
  'P' => 'F1',
  '11' => 'F1',
  'S' => 'F4',
  '14' => 'F4',
  '18' => 'F7',
  '21' => 'F10'
}

Ignore = [ 
  '57359', '57362', '57401', '57404', '57407', '57410', '57413', '57416',
  '57419', '57422', '57425', '57428', '57431', '57434', '57437', '57440',
  '57443', '57446', '57449', '57452', '57360', '57399', '57402', '57405',
  '57408', '57411', '57414', '57417', '57420', '57423', '57426', '57429',
  '57432', '57435', '57438', '57441', '57444', '57447', '57450', '57453',
  '57424', '57430', '57433', '57436', '57439', '57442', '57445', '57448',
  '57451', '57454', '57427', '57400', '57403', '57406', '57409', '57412',
  '57415', '57418', '57421', '57358', '57361', '1E' 
]
